<template>
  <div class="container">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">概况</el-breadcrumb-item>
      <el-breadcrumb-item><a href="/">订单管理</a></el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
      <div class="tableDiv">
        <el-table :data="orderTable" style="width: 100%" border="">
          <el-table-column type="selection" align="center"></el-table-column>
          <el-table-column
            prop="orderNum"
            label="订单编号"
            width="180"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="category"
            label="商品类别"
            width="180"
            align="center"
          >
          </el-table-column>
          <el-table-column prop="goodsName" label="商品名称" align="center">
          </el-table-column>
          <el-table-column prop="vipName" label="会员名称" align="center">
          </el-table-column>
          <el-table-column prop="duihuanNum" label="兑换数量" align="center">
          </el-table-column>
          <el-table-column prop="duihuanTime" label="兑换时间" align="center">
          </el-table-column>
          <el-table-column prop="orderStatus" label="订单状态" align="center">
          </el-table-column>
          <el-table-column label="操作" align="center">
            <template slot-scope="scope">
              <el-link @click="orderInfo(scope.row)" :underline="false"
                >订单详情</el-link
              >
            </template>
          </el-table-column>
        </el-table>
        <el-pagination
          :current-page="1"
          :page-sizes="[100, 200, 300, 400]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="400"
        >
        </el-pagination>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      handleSizeChange: 1,
      checked: "",
      orderTable: [
        {
          orderNum: "196012",
          category: "玩具",
          goodsName: "托马小火车轨道男孩动脑玩具益智3岁",
          vipName: "习近平",
          duihuanNum: "22",
          duihuanTime: "2020-01-28",
          orderStatus: "已完成"
        },
        {
          orderNum: "196012",
          category: "数码",
          goodsName: "托马小火车轨道男孩动脑玩具益智3岁",
          vipName: "习近平",
          duihuanNum: "22",
          duihuanTime: "2020-01-28",
          orderStatus: "已完成"
        },
        {
          orderNum: "196012",
          category: "数码",
          goodsName: "托马小火车轨道男孩动脑玩具益智3岁",
          vipName: "习近平",
          duihuanNum: "22",
          duihuanTime: "2020-01-28",
          orderStatus: "已取消"
        }
      ]
    };
  },
  created() {},
  methods: {
    orderInfo() {
      this.$router.push("orderInfo");
    }
  }
};
</script>

<style lang="scss" scoped>
.tableDiv {
  margin-top: 12px;
}

.el-pagination {
  margin: 20px !important;
}
</style>
